# -*-coding:utf-8-*-
import datetime


class HanderFunc:
    """
    一些常用函数的处理
    """
    @staticmethod
    def get_all_date(start_date=None, end_date=None):
        """
        start='2016-06-01'  
        end='2017-01-01'
        """
        if start_date is None and end_date is None:
            return False

        datestart = datetime.datetime.strptime(start_date, '%Y-%m-%d')
        dateend = datetime.datetime.strptime(end_date, '%Y-%m-%d')
        date_list = [datestart.strftime('%Y-%m-%d')]
        while datestart < dateend:
            datestart += datetime.timedelta(days=1)
            date_list.append(datestart.strftime('%Y-%m-%d'))

        return date_list
